package com.yyge.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yyge.controller.mobile.cart.req.MobileCartAddReq;
import com.yyge.controller.mobile.cart.req.MobileAddCartNumReq;
import com.yyge.controller.mobile.cart.resp.MobileCartResp;
import com.yyge.entity.ShoppingCart;

import java.util.List;

/**
* @author Administrator
* @description 针对表【shopping_cart(购物车)】的数据库操作Service
* @createDate 2023-07-02 20:36:22
*/
public interface ShoppingCartService extends IService<ShoppingCart> {

    List<MobileCartResp> findByMerchantId(Long id);

    Integer cartAdd(MobileCartAddReq req);

    Integer addCarNumApi(MobileAddCartNumReq req);

    Integer subCarNumApi(Long dishFlavorId);

    /**
     * 清空自己购物商家的购物车数据
     * @param merchantId
     * @return
     */
    boolean cleanCart(Long merchantId);
}
